﻿<%@ Page Title="付费用户申请审批" Language="C#" MasterPageFile="~/masterPage/admin/Manage.master" AutoEventWireup="true" CodeFile="ChargeUserVerified.aspx.cs" Inherits="Management_Moderation_ChargeUserVerified" %>

<%@ MasterType VirtualPath="~/masterPage/admin/Manage.master" %>  

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <telerik:RadTabStrip ID="rtsNavigator" runat="server" MultiPageID="rmpContent">
        <Tabs>
            <telerik:RadTab runat="server" Text="付费供应商审核" Selected="true">
            </telerik:RadTab>
            <telerik:RadTab runat="server" Text="付费采购商审核">
            </telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>


    <telerik:RadMultiPage ID="rmpContent" runat="server">
        <telerik:RadPageView ID="rpvModerateVendor" runat="server" Selected="true">
            <telerik:RadGrid ID="rgridVendors" runat="server" Width="760" ShowStatusBar="true"
        AllowPaging="True" AutoGenerateColumns="False" GridLines="None" DataSourceID="odsVendors"
        onitemcommand="rgridVendors_ItemCommand">
<MasterTableView DataSourceID="odsVendors" DataKeyNames="CompanyID">

    <Columns>
        <telerik:GridBoundColumn DataField="CompanyName" 
            HeaderText="公司名称" UniqueName="CompanyName">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="OfficePhone" 
            HeaderText="公司电话" UniqueName="OfficePhone">
        </telerik:GridBoundColumn>
        <telerik:GridTemplateColumn HeaderText="电话有效性" DataField="OfficePhoneValidate">
            <ItemTemplate>
                <asp:ImageButton ID="OfficePhoneValidate" BorderWidth="0px" CommandName="validateop"
                 ImageUrl='<%# (bool)Eval("OfficePhoneValidate")? "~/images/backImg/ok.png": "~/images/backImg/blank_ok.png" %>'
                 ToolTip='<%# (bool)Eval("OfficePhoneValidate")? "点击更改为无效": "点击更改为有效" %>'
                 AlternateText="验证"  Style="cursor: pointer;" runat="server"></asp:ImageButton>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn DataField="CellPhone" 
            HeaderText="手机号码" UniqueName="CellPhone">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Fax" HeaderText="传真" 
            UniqueName="Fax">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Province" HeaderText="省份" 
            UniqueName="Province">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="City" HeaderText="城市" 
            UniqueName="City">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Address" HeaderText="地址" 
            UniqueName="Address">
        </telerik:GridBoundColumn>
        <telerik:GridButtonColumn ButtonType="LinkButton" CommandName="approve" Text="批准"  ConfirmDialogHeight="100" ConfirmDialogWidth="100" ConfirmTitle="确认批准" ConfirmText="确认您要批准该供应商申请么" ConfirmDialogType="Classic" ></telerik:GridButtonColumn>
        <telerik:GridButtonColumn ButtonType="LinkButton" CommandName="reject" Text="拒绝" ConfirmDialogHeight="100" ConfirmDialogWidth="100" ConfirmTitle="确认拒绝" ConfirmText="确认您要拒绝该供应商申请么" ConfirmDialogType="Classic"></telerik:GridButtonColumn>
    </Columns>
    <DetailTables>
        <telerik:GridTableView DataKeyNames="CertID" DataSourceID="sdsCompanyCert" Width="100%" runat="server">
            <ParentTableRelation>
                <telerik:GridRelationFields DetailKeyField="CompanyID" MasterKeyField="CompanyID" />
            </ParentTableRelation>
            <Columns>
                <telerik:GridBoundColumn HeaderText="名称" DataField="CertName" UniqueName="CertName"></telerik:GridBoundColumn>
                <telerik:GridButtonColumn ButtonType="LinkButton" CommandName="downloadfile" DataTextField="CertFileName" HeaderText="证书文件/附件" UniqueName="CertFileName"></telerik:GridButtonColumn> 
            </Columns>
            <NoRecordsTemplate>
            该供应商未上传任何执照和任何资质证书及附件
            </NoRecordsTemplate>
        </telerik:GridTableView>
    </DetailTables>

    <PagerStyle FirstPageToolTip="首页" LastPageToolTip="末页" NextPagesToolTip="下页" PrevPagesToolTip="上页" ShowPagerText="false" PageSizeLabelText="每页显示:" />
</MasterTableView>
    </telerik:RadGrid>
        </telerik:RadPageView>

    <telerik:RadPageView ID="rpvModerateBuyer" runat="server">
    <telerik:RadGrid ID="rgridBuyers" runat="server" Width="760"
        AllowPaging="True" AutoGenerateColumns="False" GridLines="None" DataSourceID="odsBuyers"
        onitemcommand="rgridBuyers_ItemCommand">
<MasterTableView DataKeyNames="CompanyID">

    <Columns>
        <telerik:GridBoundColumn DataField="CompanyName" HeaderText="公司名称" UniqueName="CompanyName">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="OfficePhone" HeaderText="公司电话" UniqueName="OfficePhone">
        </telerik:GridBoundColumn>
        <telerik:GridTemplateColumn HeaderText="电话有效性" DataField="OfficePhoneValidate">
            <ItemTemplate>
                <asp:ImageButton ID="OfficePhoneValidate" BorderWidth="0px" CommandName="validateop"
                 ImageUrl='<%# (bool)Eval("OfficePhoneValidate")? "~/images/backImg/ok.png": "~/images/backImg/blank_ok.png" %>'
                 ToolTip='<%# (bool)Eval("OfficePhoneValidate")? "点击更改为无效": "点击更改为有效" %>'
                 AlternateText="验证"  Style="cursor: pointer;" runat="server"></asp:ImageButton>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn DataField="CellPhone" HeaderText="手机号码" UniqueName="CellPhone">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Fax" HeaderText="传真" UniqueName="Fax">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Province" HeaderText="省份" UniqueName="Province">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="City" HeaderText="城市" UniqueName="City">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Address" HeaderText="地址" UniqueName="Address">
        </telerik:GridBoundColumn>
        <telerik:GridButtonColumn ButtonType="LinkButton" CommandName="approve" Text="批准"  ConfirmDialogHeight="100" ConfirmDialogWidth="100" ConfirmTitle="确认批准" ConfirmText="确认您要批准该采购商申请么" ConfirmDialogType="Classic" ></telerik:GridButtonColumn>
        <telerik:GridButtonColumn ButtonType="LinkButton" CommandName="reject" Text="拒绝" ConfirmDialogHeight="100" ConfirmDialogWidth="100" ConfirmTitle="确认拒绝" ConfirmText="确认您要拒绝该采购商申请么" ConfirmDialogType="Classic"></telerik:GridButtonColumn>
    </Columns>
    <PagerStyle AlwaysVisible="true" FirstPageToolTip="首页" LastPageToolTip="末页" NextPagesToolTip="下页" PrevPagesToolTip="上页" ShowPagerText="false" PageSizeLabelText="每页显示:" />
</MasterTableView>
    </telerik:RadGrid>
        
        </telerik:RadPageView>
        
    </telerik:RadMultiPage>


<%--    <asp:ObjectDataSource ID="odsVendors" runat="server" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="SelectDynamic" 
        TypeName="SalePartial.BLL.XPCompany">
        <SelectParameters>
            <asp:Parameter DefaultValue="VendorModerateStatus = 0" Type="String" Name="v_whereCondition" />
            <asp:Parameter DefaultValue="" Name="v_orderByExpression" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="odsBuyers" runat="server" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="SelectDynamic" 
        TypeName="SalePartial.BLL.XPCompany">
        <SelectParameters>
            <asp:Parameter DefaultValue="BuyerModerateStatus = 0" Type="String" Name="v_whereCondition" />
            <asp:Parameter DefaultValue="" Name="v_orderByExpression" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>--%>
    <asp:ObjectDataSource ID="odsInquiry" runat="server" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="SelectDynamic"
        TypeName="SalePartial.BLL.XPInquiry">
        <SelectParameters>
            <asp:Parameter DefaultValue="InquiryStatus=0100000" Type="String" Name="v_whereCondition" />
            <asp:Parameter  DefaultValue="" Type="String" Name="v_orderByExpression"/>
        </SelectParameters>
    </asp:ObjectDataSource>

          <%-- ning start   付费用户的VendorModerateStatus='2'  --%>
       <asp:SqlDataSource ID="odsBuyers" runat="server" 
        ConnectionString="<%$ ConnectionStrings:XunPanConnectionString %>" 
        SelectCommand="SELECT C.CompanyID,C.CompanyName,I.Country, I.Province,I.City,Address,C.OfficePhone,C.CellPhone,C.OfficePhoneValidate,C.CellPhoneValidate,C.Fax,C.FaxValidate
                FROM XPUserProfile I,XPCompany C where I.UserID = C.UserID  and BuyerModerateStatus='2' ">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="odsVendors" runat="server" 
        ConnectionString="<%$ ConnectionStrings:XunPanConnectionString %>" 
        SelectCommand="SELECT C.CompanyID,C.CompanyName,I.Country, I.Province,I.City,Address,C.OfficePhone,C.CellPhone,C.OfficePhoneValidate,C.CellPhoneValidate,C.Fax,C.FaxValidate
                FROM XPUserProfile I,XPCompany C where I.UserID = C.UserID  and  VendorModerateStatus='2' ">
        </asp:SqlDataSource>
        <%-- ning end--%>

    <asp:SqlDataSource ID="sdsInquiryTitle" runat="server" 
        ConnectionString="<%$ ConnectionStrings:XunPanConnectionString %>" 
        SelectCommand="SELECT [InquiryID], [InquiryStatus], [PartName], [CreateDate], [lbIsPublic], [lbExpire], [lbAssign], [lbDelivery] FROM [XPInquiry] WHERE ([InquiryStatus] = @InquiryStatus)">
        <SelectParameters>
            <asp:Parameter DefaultValue="{0:**0****}" Name="InquiryStatus" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="sdsInquiryDetail" runat="server" 
        ConnectionString="<%$ ConnectionStrings:XunPanConnectionString %>" 
        SelectCommand="SELECT [InquiryID], [PartName], [Quantity1], [Quantity2], [Quantity3], [Unit], [CompanyName], [UserName] FROM [vw_XPInquiryDetail]"></asp:SqlDataSource>

    <asp:SqlDataSource ID="sdsCompanyCert" runat="server" 
        ConnectionString="<%$ ConnectionStrings:XunPanConnectionString %>" 
        SelectCommand="SELECT [CertID], [CompanyID], [CertType], [CertName], [CertFileName], [CertFileContentType], [CertFileSize], [ModerateStatus] FROM [vw_XPCompanyCerts] WHERE ([CompanyID] = @CompanyID)">
        <SelectParameters>
            <asp:SessionParameter Name="CompanyID" SessionField="CompanyID" DbType="Guid" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>

